package com.yuyuy.ssm.web;



import com.yuyuy.ssm.pojo.User;
import com.yuyuy.ssm.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/user")
public class UserController {
    public static void main(String[] args) {
        System.out.println("wangzhen");
    }
    @Autowired
    UserService userService;

    @GetMapping("/findAll")
    public List<User> findAll(){
        return userService.findAll();
    }
}
